﻿@using hello.csharp.helper
@{
    ViewData["Title"] = "LogView";
    var logs = (List<LogObj>)ViewData["log"];
}

<div>
    <table class="table table-striped table-bordered table-hover log-line">
        <thead class="log-head">
            <tr>
                <td>时间</td>
                <td>日志信息</td>
                <td>来源</td>
                <td>Controller</td>
            </tr>
        </thead>
        <tbody>
            @foreach (var obj in logs)
            {
                <tr class="log-@obj.Level">
                    <td class="col-md-1">@obj.Time</td>
                    <td class="col-md-7">@Html.Raw(obj.Message)</td>
                    <td class="col-md-3">@obj.Method</td>
                    <td class="col-md-1">@obj.Action</td>
                </tr>
            }
        </tbody>
    </table>
</div>